<nav>
    <h2><?php echo $r['title'];?></h2>
    <?php foreach($r['item'] as $i){ ?>
    <div class="menuItem">
        <a class="title" href="<?php echo $i['url']; ?>">
            <div class="icon "><span class="<?php echo $i['icon']; ?>"></span></div>
            <div class="text"><?php echo $i['name']; ?></div>
        </a>
        <div class="subItem"></div>
    </div>
    <?php } ?>
</nav>